package cn.dliyy.warehouse.bean;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

import cn.dliyy.base.bean.IdAI;

/**
 * 品牌
 * 
 * @author DELL
 * 
 */
@Component
@Entity
@Table
public class BBrand extends IdAI {
  private static final long serialVersionUID = 3037458401925884830L;
  @Column
  @NotEmpty
  @Length(max = 45)
  private String name;
  @ManyToOne(cascade = { CascadeType.ALL })
  @JoinColumn(name = "companyid")
  private BCompany company;
  @Column
  @Length(max = 255)
  private String note;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public BCompany getCompany() {
    return company;
  }

  public void setCompany(BCompany company) {
    this.company = company;
  }

  public String getNote() {
    return note;
  }

  public void setNote(String note) {
    this.note = note;
  }

}
